<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
                      "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
    <title>Zend_Service_Flickr - Zend Framework Manual</title>

    <link href="../css/shCore.css" rel="stylesheet" type="text/css" />
    <link href="../css/shThemeDefault.css" rel="stylesheet" type="text/css" />
    <link href="../css/styles.css" media="all" rel="stylesheet" type="text/css" />
</head>
<body>
<h1>Zend Framework</h1>
<h2>Programmer's Reference Guide</h2>
<ul>
    <li><a href="../en/zend.service.flickr.html">Inglês (English)</a></li>
    <li><a href="../pt-br/zend.service.flickr.html">Português Brasileiro (Brazilian Portuguese)</a></li>
</ul>
<table width="100%">
    <tr valign="top">
        <td width="85%">
            <table width="100%">
                <tr>
                    <td width="25%" style="text-align: left;">
                    <a href="zend.service.ebay.finding.html">Zend_Service_Ebay_Finding</a>
                    </td>

                    <td width="50%" style="text-align: center;">
                        <div class="up"><span class="up"><a href="zend.service.html">Zend_Service</a></span><br />
                        <span class="home"><a href="manual.html">Programmer's Reference Guide</a></span></div>
                    </td>

                    <td width="25%" style="text-align: right;">
                        <div class="next" style="text-align: right; float: right;"><a href="zend.service.livedocx.html">Zend_Service_LiveDocx</a></div>
                    </td>
                </tr>
            </table>
<hr />
<div id="zend.service.flickr" class="section"><div class="info"><h1 class="title">Zend_Service_Flickr</h1></div>
    

    <div class="section" id="zend.service.flickr.introduction"><div class="info"><h1 class="title">Introduction</h1></div>
        

        <p class="para">
            <span class="classname">Zend_Service_Flickr</span> is a simple <acronym class="acronym">API</acronym> for using
            the Flickr REST Web Service. In order to use the Flickr web services, you must have an
            <acronym class="acronym">API</acronym> key. To obtain a key and for more information about the Flickr
            REST Web Service, please visit the <a href="http://www.flickr.com/services/api/" class="link external">&raquo; Flickr <acronym class="acronym">API</acronym>
                Documentation</a>.
        </p>

        <p class="para">
            In the following example, we use the  <span class="methodname">tagSearch()</span> method to
            search for photos having &quot;php&quot; in the tags.
        </p>

        <div class="example" id="zend.service.flickr.introduction.example-1"><div class="info"><p><b>Example #1 Simple Flickr Photo Search</b></p></div>
            

            <pre class="programlisting brush: php">
$flickr = new Zend_Service_Flickr(&#039;MY_API_KEY&#039;);

$results = $flickr-&gt;tagSearch(&quot;php&quot;);

foreach ($results as $result) {
    echo $result-&gt;title . &#039;&lt;br /&gt;&#039;;
}
</pre>

        </div>

        <blockquote class="note"><p><b class="note">Note</b>: <span class="info"><b>Optional parameter</b><br /></span>
            

            <p class="para">
                 <span class="methodname">tagSearch()</span> accepts an optional second parameter as an
                array of options.
            </p>
        </p></blockquote>
    </div>

    <div class="section" id="zend.service.flickr.finding-users"><div class="info"><h1 class="title">Finding Flickr Users&#039; Photos and Information</h1></div>
        

        <p class="para">
            <span class="classname">Zend_Service_Flickr</span> provides several ways to get information
            about Flickr users:
        </p>

        <ul class="itemizedlist">
            <li class="listitem">
                <p class="para">
                     <span class="methodname">userSearch()</span>: Accepts a string query of space-delimited
                    tags and an optional second parameter as an array of search options, and returns
                    a set of photos as a <span class="classname">Zend_Service_Flickr_ResultSet</span>
                    object.
                </p>
            </li>

            <li class="listitem">
                <p class="para">
                     <span class="methodname">getIdByUsername()</span>: Returns a string user ID associated
                    with the given username string.
                </p>
            </li>

            <li class="listitem">
                <p class="para">
                     <span class="methodname">getIdByEmail()</span>: Returns a string user ID associated
                    with the given email address string.
                </p>
            </li>
        </ul>

        <div class="example" id="zend.service.flickr.finding-users.example-1"><div class="info"><p><b>Example #2 Finding a Flickr User&#039;s Public Photos by E-Mail Address</b></p></div>
            

            <div class="example-contents"><p>
                In this example, we have a Flickr user&#039;s e-mail address, and we search for the
                user&#039;s public photos by using the  <span class="methodname">userSearch()</span> method:
            </p></div>

            <pre class="programlisting brush: php">
$flickr = new Zend_Service_Flickr(&#039;MY_API_KEY&#039;);

$results = $flickr-&gt;userSearch($userEmail);

foreach ($results as $result) {
    echo $result-&gt;title . &#039;&lt;br /&gt;&#039;;
}
</pre>

        </div>
    </div>

    <div class="section" id="zend.service.flickr.grouppoolgetphotos"><div class="info"><h1 class="title">Finding photos From a Group Pool</h1></div>
        

        <p class="para">
            <span class="classname">Zend_Service_Flickr</span> allows to retrieve a group&#039;s pool photos
            based on the group ID. Use the  <span class="methodname">groupPoolGetPhotos()</span> method:
        </p>

        <div class="example" id="zend.service.flickr.grouppoolgetphotos.example-1"><div class="info"><p><b>Example #3 Retrieving a Group&#039;s Pool Photos by Group ID</b></p></div>
            

            <pre class="programlisting brush: php">
$flickr = new Zend_Service_Flickr(&#039;MY_API_KEY&#039;);

    $results = $flickr-&gt;groupPoolGetPhotos($groupId);

    foreach ($results as $result) {
        echo $result-&gt;title . &#039;&lt;br /&gt;&#039;;
    }
</pre>

        </div>

        <blockquote class="note"><p><b class="note">Note</b>: <span class="info"><b>Optional parameter</b><br /></span>
            

            <p class="para">
                 <span class="methodname">groupPoolGetPhotos()</span> accepts an optional second parameter
                as an array of options.
            </p>
        </p></blockquote>
    </div>

    <div class="section" id="zend.service.flickr.getimagedetails"><div class="info"><h1 class="title">Retrieving Flickr Image Details</h1></div>
        

        <p class="para">
            <span class="classname">Zend_Service_Flickr</span> makes it quick and easy to get an image&#039;s
            details based on a given image ID. Just use the
             <span class="methodname">getImageDetails()</span> method, as in the following example:
        </p>

        <div class="example" id="zend.service.flickr.getimagedetails.example-1"><div class="info"><p><b>Example #4 Retrieving Flickr Image Details</b></p></div>
            

            <div class="example-contents"><p>
                Once you have a Flickr image ID, it is a simple matter to fetch information about
                the image:
            </p></div>

            <pre class="programlisting brush: php">
$flickr = new Zend_Service_Flickr(&#039;MY_API_KEY&#039;);

$image = $flickr-&gt;getImageDetails($imageId);

echo &quot;Image ID $imageId is $image-&gt;width x $image-&gt;height pixels.&lt;br /&gt;\n&quot;;
echo &quot;&lt;a href=\&quot;$image-&gt;clickUri\&quot;&gt;Click for Image&lt;/a&gt;\n&quot;;
</pre>

        </div>
    </div>

    <div class="section" id="zend.service.flickr.classes"><div class="info"><h1 class="title">Zend_Service_Flickr Result Classes</h1></div>
        

        <p class="para">
            The following classes are all returned by  <span class="methodname">tagSearch()</span> and
             <span class="methodname">userSearch()</span>:

            <ul class="itemizedlist">
                <li class="listitem">
                    <p class="para">
                        <a href="zend.service.flickr.html#zend.service.flickr.classes.resultset" class="link"><span class="classname">Zend_Service_Flickr_ResultSet</span></a>
                    </p>
                </li>

                <li class="listitem">
                    <p class="para">
                       <a href="zend.service.flickr.html#zend.service.flickr.classes.result" class="link"><span class="classname">Zend_Service_Flickr_Result</span></a>
                   </p>
                </li>

                <li class="listitem">
                    <p class="para">
                        <a href="zend.service.flickr.html#zend.service.flickr.classes.image" class="link"><span class="classname">Zend_Service_Flickr_Image</span></a>
                    </p>
                </li>
            </ul>
        </p>

        <div class="section" id="zend.service.flickr.classes.resultset"><div class="info"><h1 class="title">Zend_Service_Flickr_ResultSet</h1></div>
            

            <p class="para">Represents a set of Results from a Flickr search.</p>

            <blockquote class="note"><p><b class="note">Note</b>: 
                <p class="para">
                    Implements the <span class="classname">SeekableIterator</span> interface for easy
                    iteration (e.g., using  <span class="methodname">foreach()</span>), as well as direct
                    access to a specific result using  <span class="methodname">seek()</span>.
                </p>
            </p></blockquote>

            <div class="section" id="zend.service.flickr.classes.resultset.properties"><div class="info"><h1 class="title">Properties</h1></div>
                

                <table id="zend.service.flickr.classes.resultset.properties.table-1" class="doctable table"><div class="info"><caption><b>Zend_Service_Flickr_ResultSet Properties</b></caption></div>
                    

                    
                        <thead valign="middle">
                            <tr valign="middle">
                                <th>Name</th>
                                <th>Type</th>
                                <th>Description</th>
                            </tr>

                        </thead>


                        <tbody valign="middle" class="tbody">
                            <tr valign="middle">
                                <td align="left">totalResultsAvailable</td>
                                <td align="left">int</td>
                                <td align="left">Total Number of Results available</td>
                            </tr>


                            <tr valign="middle">
                                <td align="left">totalResultsReturned</td>
                                <td align="left">int</td>
                                <td align="left">Total Number of Results returned</td>
                            </tr>


                            <tr valign="middle">
                                <td align="left">firstResultPosition</td>
                                <td align="left">int</td>
                                <td align="left">The offset in the total result set of this result set</td>
                            </tr>

                        </tbody>
                    
                </table>

            </div>

            <div class="section" id="zend.service.flickr.classes.resultset.totalResults"><div class="info"><h1 class="title">Zend_Service_Flickr_ResultSet::totalResults()</h1></div>
                

                <p class="para">
                    <div class="methodsynopsis dc-description">
                        <span class="type">int</span>
                         <span class="methodname">totalResults</span>
                         ( <span class="methodparam">void</span>
                    </div>

                </p>

                <p class="para">
                    Returns the total number of results in this result set.
                </p>

                <p class="para">
                    <a href="zend.service.flickr.html#zend.service.flickr.classes" class="link">Back to Class List</a>
                </p>
            </div>
        </div>

        <div class="section" id="zend.service.flickr.classes.result"><div class="info"><h1 class="title">Zend_Service_Flickr_Result</h1></div>
            

            <p class="para">
                A single Image result from a Flickr query
            </p>

            <div class="section" id="zend.service.flickr.classes.result.properties"><div class="info"><h1 class="title">Properties</h1></div>
                

                <table id="zend.service.flickr.classes.result.properties.table-1" class="doctable table"><div class="info"><caption><b>Zend_Service_Flickr_Result Properties</b></caption></div>
                    

                    
                        <thead valign="middle">
                            <tr valign="middle">
                                <th>Name</th>
                                <th>Type</th>
                                <th>Description</th>
                            </tr>

                        </thead>


                        <tbody valign="middle" class="tbody">
                            <tr valign="middle">
                                <td align="left">id</td>
                                <td align="left">string</td>
                                <td align="left">Image ID</td>
                            </tr>


                            <tr valign="middle">
                                <td align="left">owner</td>
                                <td align="left">string</td>
                                <td align="left">The photo owner&#039;s <acronym class="acronym">NSID</acronym>.</td>
                            </tr>


                            <tr valign="middle">
                                <td align="left">secret</td>
                                <td align="left">string</td>
                                <td align="left">A key used in url construction.</td>
                            </tr>


                            <tr valign="middle">
                                <td align="left">server</td>
                                <td align="left">string</td>

                                <td align="left">
                                    The servername to use for <acronym class="acronym">URL</acronym> construction.
                                </td>
                            </tr>


                            <tr valign="middle">
                                <td align="left">title</td>
                                <td align="left">string</td>
                                <td align="left">The photo&#039;s title.</td>
                            </tr>


                            <tr valign="middle">
                                <td align="left">ispublic</td>
                                <td align="left">string</td>
                                <td align="left">The photo is public.</td>
                            </tr>


                            <tr valign="middle">
                                <td align="left">isfriend</td>
                                <td align="left">string</td>

                                <td align="left">
                                    The photo is visible to you because you are a friend of the
                                    owner.
                                </td>
                            </tr>


                            <tr valign="middle">
                                <td align="left">isfamily</td>
                                <td align="left">string</td>

                                <td align="left">
                                    The photo is visible to you because you are family of the owner.
                                </td>
                            </tr>


                            <tr valign="middle">
                                <td align="left">license</td>
                                <td align="left">string</td>
                                <td align="left">The license the photo is available under.</td>
                            </tr>


                            <tr valign="middle">
                                <td align="left">dateupload</td>
                                <td align="left">string</td>
                                <td align="left">The date the photo was uploaded.</td>
                            </tr>


                            <tr valign="middle">
                                <td align="left">datetaken</td>
                                <td align="left">string</td>
                                <td align="left">The date the photo was taken.</td>
                            </tr>


                            <tr valign="middle">
                                <td align="left">ownername</td>
                                <td align="left">string</td>
                                <td align="left">The screenname of the owner.</td>
                            </tr>


                            <tr valign="middle">
                                <td align="left">iconserver</td>
                                <td align="left">string</td>

                                <td align="left">
                                    The server used in assembling icon <acronym class="acronym">URL</acronym>s.
                                </td>
                            </tr>


                            <tr valign="middle">
                                <td align="left">Square</td>

                                <td align="left">
                                    <a href="zend.service.flickr.html#zend.service.flickr.classes.image" class="link">Zend_Service_Flickr_Image</a>
                                </td>

                                <td align="left">A 75x75 thumbnail of the image.</td>
                            </tr>


                            <tr valign="middle">
                                <td align="left">Thumbnail</td>

                                <td align="left">
                                    <a href="zend.service.flickr.html#zend.service.flickr.classes.image" class="link">Zend_Service_Flickr_Image</a>
                                </td>

                                <td align="left">A 100 pixel thumbnail of the image.</td>
                            </tr>


                            <tr valign="middle">
                                <td align="left">Small</td>

                                <td align="left">
                                    <a href="zend.service.flickr.html#zend.service.flickr.classes.image" class="link">Zend_Service_Flickr_Image</a>
                                </td>

                                <td align="left">A 240 pixel version of the image.</td>
                            </tr>


                            <tr valign="middle">
                                <td align="left">Medium</td>

                                <td align="left">
                                    <a href="zend.service.flickr.html#zend.service.flickr.classes.image" class="link">Zend_Service_Flickr_Image</a>
                                </td>

                                <td align="left">A 500 pixel version of the image.</td>
                            </tr>


                            <tr valign="middle">
                                <td align="left">Large</td>

                                <td align="left">
                                    <a href="zend.service.flickr.html#zend.service.flickr.classes.image" class="link">Zend_Service_Flickr_Image</a>
                                </td>

                                <td align="left">A 640 pixel version of the image.</td>
                            </tr>


                            <tr valign="middle">
                                <td align="left">Original</td>

                                <td align="left">
                                    <a href="zend.service.flickr.html#zend.service.flickr.classes.image" class="link">Zend_Service_Flickr_Image</a>
                                </td>

                                <td align="left">The original image.</td>
                            </tr>

                        </tbody>
                    
                </table>


                <p class="para">
                    <a href="zend.service.flickr.html#zend.service.flickr.classes" class="link">Back to Class List</a>
                </p>
            </div>
        </div>

        <div class="section" id="zend.service.flickr.classes.image"><div class="info"><h1 class="title">Zend_Service_Flickr_Image</h1></div>
            

            <p class="para">Represents an Image returned by a Flickr search.</p>

            <div class="section" id="zend.service.flickr.classes.image.properties"><div class="info"><h1 class="title">Properties</h1></div>
                

                <table id="zend.service.flickr.classes.image.properties.table-1" class="doctable table"><div class="info"><caption><b>Zend_Service_Flickr_Image Properties</b></caption></div>
                    

                    
                        <thead valign="middle">
                            <tr valign="middle">
                                <th>Name</th>
                                <th>Type</th>
                                <th>Description</th>
                            </tr>

                        </thead>


                        <tbody valign="middle" class="tbody">
                            <tr valign="middle">
                                <td align="left">uri</td>
                                <td align="left">string</td>
                                <td align="left">URI for the original image</td>
                            </tr>


                            <tr valign="middle">
                                <td align="left">clickUri</td>
                                <td align="left">string</td>

                                <td align="left">
                                    Clickable <acronym class="acronym">URI</acronym> (i.e. the Flickr page) for the
                                    image
                                </td>
                            </tr>


                            <tr valign="middle">
                                <td align="left">width</td>
                                <td align="left">int</td>
                                <td align="left">Width of the Image</td>
                            </tr>


                            <tr valign="middle">
                                <td align="left">height</td>
                                <td align="left">int</td>
                                <td align="left">Height of the Image</td>
                            </tr>

                        </tbody>
                    
                </table>


                <p class="para">
                    <a href="zend.service.flickr.html#zend.service.flickr.classes" class="link">Back to Class List</a>
                </p>
            </div>
        </div>
    </div>
</div>
        <hr />

            <table width="100%">
                <tr>
                    <td width="25%" style="text-align: left;">
                    <a href="zend.service.ebay.finding.html">Zend_Service_Ebay_Finding</a>
                    </td>

                    <td width="50%" style="text-align: center;">
                        <div class="up"><span class="up"><a href="zend.service.html">Zend_Service</a></span><br />
                        <span class="home"><a href="manual.html">Programmer's Reference Guide</a></span></div>
                    </td>

                    <td width="25%" style="text-align: right;">
                        <div class="next" style="text-align: right; float: right;"><a href="zend.service.livedocx.html">Zend_Service_LiveDocx</a></div>
                    </td>
                </tr>
            </table>
</td>
        <td style="font-size: smaller;" width="15%"> <style type="text/css">
#leftbar {
	float: left;
	width: 186px;
	padding: 5px;
	font-size: smaller;
}
ul.toc {
	margin: 0px 5px 5px 5px;
	padding: 0px;
}
ul.toc li {
	font-size: 85%;
	margin: 1px 0 1px 1px;
	padding: 1px 0 1px 11px;
	list-style-type: none;
	background-repeat: no-repeat;
	background-position: center left;
}
ul.toc li.header {
	font-size: 115%;
	padding: 5px 0px 5px 11px;
	border-bottom: 1px solid #cccccc;
	margin-bottom: 5px;
}
ul.toc li.active {
	font-weight: bold;
}
ul.toc li a {
	text-decoration: none;
}
ul.toc li a:hover {
	text-decoration: underline;
}
</style>
 <ul class="toc">
  <li class="header home"><a href="manual.html">Programmer's Reference Guide</a></li>
  <li class="header up"><a href="manual.html">Programmer's Reference Guide</a></li>
  <li class="header up"><a href="reference.html">Zend Framework Reference</a></li>
  <li class="header up"><a href="zend.service.html">Zend_Service</a></li>
  <li><a href="zend.service.introduction.html">Introduction</a></li>
  <li><a href="zend.service.akismet.html">Zend_Service_Akismet</a></li>
  <li><a href="zend.service.amazon.html">Zend_Service_Amazon</a></li>
  <li><a href="zend.service.amazon.ec2.html">Zend_Service_Amazon_Ec2</a></li>
  <li><a href="zend.service.amazon.ec2.instance.html">Zend_Service_Amazon_Ec2: Instances</a></li>
  <li><a href="zend.service.amazon.ec2.windows.instance.html">Zend_Service_Amazon_Ec2: Windows Instances</a></li>
  <li><a href="zend.service.amazon.ec2.reserved.instance.html">Zend_Service_Amazon_Ec2: Reserved Instances</a></li>
  <li><a href="zend.service.amazon.ec2.cloudwatch.html">Zend_Service_Amazon_Ec2: CloudWatch Monitoring</a></li>
  <li><a href="zend.service.amazon.ec2.images.html">Zend_Service_Amazon_Ec2: Amazon Machine Images (AMI)</a></li>
  <li><a href="zend.service.amazon.ec2.ebs.html">Zend_Service_Amazon_Ec2: Elastic Block Storage (EBS)</a></li>
  <li><a href="zend.service.amazon.ec2.elasticip.html">Zend_Service_Amazon_Ec2: Elastic IP Addresses</a></li>
  <li><a href="zend.service.amazon.ec2.keypairs.html">Zend_Service_Amazon_Ec2: Keypairs</a></li>
  <li><a href="zend.service.amazon.ec2.zones.html">Zend_Service_Amazon_Ec2: Regions and Availability Zones</a></li>
  <li><a href="zend.service.amazon.ec2.securitygroups.html">Zend_Service_Amazon_Ec2: Security Groups</a></li>
  <li><a href="zend.service.amazon.s3.html">Zend_Service_Amazon_S3</a></li>
  <li><a href="zend.service.amazon.sqs.html">Zend_Service_Amazon_Sqs</a></li>
  <li><a href="zend.service.audioscrobbler.html">Zend_Service_Audioscrobbler</a></li>
  <li><a href="zend.service.delicious.html">Zend_Service_Delicious</a></li>
  <li><a href="zend.service.developergarden.html">Zend_Service_DeveloperGarden</a></li>
  <li><a href="zend.service.ebay.html">Zend_Service_Ebay</a></li>
  <li><a href="zend.service.ebay.finding.html">Zend_Service_Ebay_Finding</a></li>
  <li class="active"><a href="zend.service.flickr.html">Zend_Service_Flickr</a></li>
  <li><a href="zend.service.livedocx.html">Zend_Service_LiveDocx</a></li>
  <li><a href="zend.service.nirvanix.html">Zend_Service_Nirvanix</a></li>
  <li><a href="zend.service.recaptcha.html">Zend_Service_ReCaptcha</a></li>
  <li><a href="zend.service.short-url.html">Zend_Service_ShortUrl</a></li>
  <li><a href="zend.service.simpy.html">Zend_Service_Simpy</a></li>
  <li><a href="zend.service.slideshare.html">Zend_Service_SlideShare</a></li>
  <li><a href="zend.service.strikeiron.html">Zend_Service_StrikeIron</a></li>
  <li><a href="zend.service.strikeiron.bundled-services.html">Zend_Service_StrikeIron: Bundled Services</a></li>
  <li><a href="zend.service.strikeiron.advanced-uses.html">Zend_Service_StrikeIron: Advanced Uses</a></li>
  <li><a href="zend.service.technorati.html">Zend_Service_Technorati</a></li>
  <li><a href="zend.service.twitter.html">Zend_Service_Twitter</a></li>
  <li><a href="zend.service.windowsazure.html">Zend_Service_WindowsAzure</a></li>
  <li><a href="zend.service.windowsazure.storage.blob.html">Zend_Service_WindowsAzure_Storage_Blob</a></li>
  <li><a href="zend.service.windowsazure.diagnostics.manager.html">Zend_Service_WindowsAzure_Diagnostics_Manager</a></li>
  <li><a href="zend.service.windowsazure.storage.queue.html">Zend_Service_WindowsAzure_Storage_Queue</a></li>
  <li><a href="zend.service.windowsazure.storage.table.html">Zend_Service_WindowsAzure_Storage_Table</a></li>
  <li><a href="zend.service.yahoo.html">Zend_Service_Yahoo</a></li>
 </ul>
 </td>
    </tr>
</table>

<script type="text/javascript" src="../js/shCore.js"></script>
<script type="text/javascript" src="../js/shAutoloader.js"></script>
<script type="text/javascript" src="../js/main.js"></script>

</body>
</html>